<%-- 
    Document   : updatePassword
    Created on : 2017-2-22, 21:04:12
    Author     : DELL
--%>
<%@page import="lookMessage.LookMessageBean" %>
<%@page import="java.util.ArrayList" %>
<%@page import="loginRegister.LoginBean" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>个人信息管理——修改密码页面</title>
    </head>
    <body>
        <hr noshade>
        <div align="center">
            <table border="0" cellspacing="0" cellpadding="0" width="100%" align="center">
                <tr>
                    <td width="33%">
                       <a href="http://localhost:8081/PersonInforMSys/lookMessage/updateMessage.jsp">修改个人信息</a>
                    </td>
                    <td width="33%">
                         <a href="http://localhost:8081/PersonInforMSys/lookMessage/lookMessage.jsp">查看个人信息</a>
                    </td> 
                    <td width="33%">
                       修改密码
                    </td>                  
                </tr>
            </table>
        </div>

        <hr noshade>
        <br><br>
        <form action="http://localhost:8081/PersonInforMSys/UpdatePasswordServlet" method="post">
 <table width="42%" align="center" border="2" cellspacing="0" cellpadding="0" bgcolor="gray" >
            <%
                String password = null;
               
                ArrayList login = (ArrayList) session.getAttribute("login");
                if (login== null || login.size()== 0) {

                    response.sendRedirect("http://localhost:8081/PersonInforMSys/main/bottom.jsp");
                } else {
                    for (int i = login.size() - 1; i >= 0; i--) {

                        LoginBean mbean = (LoginBean) login.get(i);
                        password = mbean.getPassword();
                                       
                    }
                }
            %>

            <tr align="left">
                <td height="30">用户密码</td>
                <td>
                    <input type="password" name="password1" value="<%=password%>">  
                </td>
            </tr>
              <tr align="left">
                <td height="30">重复密码</td>
                <td>
                    <input type="password" name="password2" value="<%=password%>">  
                </td>
            </tr>
        
        <tr  >
            <td height="30" align="center" colspan="2">
                
                <input type="submit" value="确定" size="12">&nbsp;&nbsp;&nbsp;
                     <input type="reset" value="取消" size="12">
                </td>
   
            </tr>
        </form>
    </body>
</html>
